//
//  DoomEvent.m
//  MobileDoom
//
//  Created by StevenBackup on 14/04/2008.
//  Copyright 2008 Glenstal. All rights reserved.
//

#import "DoomEvent.h"


@implementation DoomEvent
- (id)initWithKeyDown:(int)button {
  self = [super init];
  if (self) {
    ev.type = ev_keydown;
    ev.data1 = button;
  }
  return self;
}

- (id)initWithKeyUp:(int)button {
  self = [super init];
  if (self) {
    ev.type = ev_keyup;
    ev.data1 = button;
  }
  return self;
}

- (id)initWithMouseX:(int)x Y:(int)y {
  self = [super init];
  if (self) {
    ev.type = ev_mouse;
    ev.data2 = x;
    ev.data3 = y;
  }
  return self;
}

- (event_t)event {
  return ev;
}
@end
